package top.zhangjianyong.tools.entity;

import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangjianyong
 * @since 2024/9/29 上午10:56
 */
@Data
public class AreaDTO extends Area {
    private List<AreaDTO> child;

    public void addChild(List<AreaDTO> areaList) {
        if (null == child) child = new ArrayList<>();
        child.addAll(areaList);
    }

    public void addChild(AreaDTO areaDTO) {
        if (null == child) child = new ArrayList<>();
        child.add(areaDTO);
    }
}
